package cn.liyiming.bbs.util;

/**
 * @program: vuedemo
 * @description: 异常处理的类
 * @author: 李一鸣
 * @create: 2020-02-18 10:13
 **/

public class SystemException extends RuntimeException {
    /**异常错误编码*/
    private int code ;
    /**异常信息*/
    private String message;

    private SystemException(){}

    public SystemException(SystemExceptionType exceptionTypeEnum,
                           String message) {
        this.code = exceptionTypeEnum.getCode();
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
